/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import type { ReactNode } from 'react';
import { DefaultOptionType } from 'antd/lib/select';
import type { ProColumns } from '@ant-design/pro-table';

type RadioProps = string[] | number[] | { label: ReactNode; value: string; disabled?: boolean }[];

const kbTypeOptions: DefaultOptionType[] = [
  { label: '快递员', value: 's' },
  { label: '驿站', value: 'yz' },
  { label: '网点', value: 'shop' },
];
const operateOptions: RadioProps = [
  { label: '转账', value: 'transfer' },
  { label: '修改金额', value: 'alter' },
];
const accountOptions: RadioProps = [
  { label: '可消费', value: 'avail_money' },
  { label: '可提现', value: 'cash_money' },
];
const modifyMoneyOptions: RadioProps = [
  { label: '加', value: 'plus' },
  { label: '减', value: 'minus' },
];
const FormColFormat = {
  labelCol: { span: 2 },
  wrapperCol: { span: 6 },
};

type AccountInfo = { [name: string]: string };

const columns: ProColumns[] = [
  {
    title: '账号',
    dataIndex: 'phone',
    width: 100,
    align: 'center',
    ellipsis: true,
  },
  {
    title: '流水交易号',
    dataIndex: 'order_number',
    width: 100,
    align: 'center',
    ellipsis: true,
  },
  {
    title: '金额',
    dataIndex: 'money',
    width: 100,
    align: 'center',
    ellipsis: true,
  },
  {
    title: '时间',
    dataIndex: 'success_time',
    width: 100,
    align: 'center',
    ellipsis: true,
  },
  {
    title: '描述',
    dataIndex: 'desc',
    width: 100,
    align: 'center',
    ellipsis: true,
  },
  {
    title: '类型描述',
    dataIndex: 'type_desc',
    width: 100,
    align: 'center',
    ellipsis: true,
  },
];

export {
  kbTypeOptions,
  operateOptions,
  accountOptions,
  modifyMoneyOptions,
  FormColFormat,
  AccountInfo,
  columns,
};
